<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link href="https://cdn.bootcss.com/highlight.js/9.15.10/styles/darcula.min.css" rel="stylesheet">
  <style>
    .hljs ul {

      list-style: decimal;

      margin: 0 0 0 40px!important;

      padding: 0

    }



    .hljs li {

      list-style: decimal-leading-zero;

      border-left: 1px solid #111!important;

      padding: 2px 5px!important;

      margin: 0!important;

      line-height: 14px;

      width: 100%;

      box-sizing: border-box

    }



    .hljs li:nth-of-type(even) {

      background-color: rgba(255,255,255,.015);

      color: inherit

    }
  </style>
  <title>Document</title>
</head>
<body>
<pre><code>/*示例代码*/

&lt;script&gt;

function show_msg(a,b){

var mgs = &quot;卿本老兔子&quot;;

alert(msg);

}

&lt;/script&gt;

</code></pre>


<script src="https://cdn.bootcss.com/highlight.js/9.18.1/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>

<script type="text/javascript">

  var e = document.querySelectorAll("code");

  var e_len = e.length;

  var i;

  for (i = 0; i < e_len; i++) {

    e[i].innerHTML = "<ul><li>" + e[i].innerHTML.replace(/\n/g, "\n</li><li>") + "\n</li></ul>";

  }

</script>
</body>
</html>
